/*
 * PyEquilibriumSolver.cpp
 *
 *  Created on: 12 Mar 2012
 *      Author: allan
 */

#include "PyEquilibriumSolver.h"

// GeoReact includes
#include <GeoReact.h>

// Boost includes
#include <boost/python.hpp>
using namespace boost::python;

void export_EquilibriumSolver()
{
	class_<EquilibriumSolverParams>("EquilibriumSolverParams", init<>())
		.def_readwrite("max_iterations",
			&EquilibriumSolverParams::max_iterations)
		
		.def_readwrite("tolerance_f",
			&EquilibriumSolverParams::tolerance_f)
		
		.def_readwrite("tolerance_n",
			&EquilibriumSolverParams::tolerance_n)
		
		.def_readwrite("phase_threshold",
			&EquilibriumSolverParams::phase_threshold)
		
		.def_readwrite("zero",
			&EquilibriumSolverParams::zero)
		
		.def_readwrite("omega",
			&EquilibriumSolverParams::omega);
	
	
	class_<EquilibriumSolver>("EquilibriumSolver", init<>())
		.def(init<const EquilibriumSolver&>())
		
		.def(init<const EquilibriumSystem&>())
		
		.def("SetParameters",
			&EquilibriumSolver::SetParameters)
		
		.def("Solve",
			&EquilibriumSolver::Solve)
		
		.def("ElementalSolve",
			&EquilibriumSolver::ElementalSolve);
}
